import java.io.*;

public class FileSaver {
	/**
	 * @author Paweł Jankowski
	 * @param path
	 * @param content
	 * @throws IOException
	 */
	
	public void save(String path, String content) throws IOException{
		BufferedWriter plik = new BufferedWriter(new FileWriter(path));
		plik.write(content);
		plik.close();
	}
	
	public String load(String path) throws IOException{
		String s = "";
		String tmp = null;
		BufferedReader plik = new BufferedReader(new FileReader(path));
		while(true){
			tmp = plik.readLine();
			if(tmp == null) break;
			s = s + tmp;
		}
		plik.close();
		return s;
	}
}
